package cn.school.controller.iot;

import cn.school.common.api.CommonResult;
import cn.school.iot.eneity.IotDeviceOperateLogInfo;
import cn.school.iot.param.LogParam;
import cn.school.iot.service.IotDeviceOperateLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: TODO(一句话描述该类的功能)
 * @ClassName: IotDeviceOperateLogController
 * @Author: tzw
 * @Date: 2024/4/22 9:52
 */
@RestController
public class IotDeviceOperateLogController {
    @Resource
    private IotDeviceOperateLogService iotDeviceOperateLogService;

    @ApiOperation(value = "adLog => 接收门禁操作日志")
    @PostMapping("/faceGateRule/addLog")
    public CommonResult addLog(@RequestBody IotDeviceOperateLogInfo info){
        return iotDeviceOperateLogService.addLog(info);
    }

    @ApiOperation(value = "selectIotDeviceOperateLogList => 查询门禁操作日志")
    @GetMapping("/faceGateRule/getOprateLog")
    public CommonResult selectIotDeviceOperateLogList(LogParam log){
        return iotDeviceOperateLogService.selectIotDeviceOperateLogList(log);
    }

}
